#staticLocalisation makefile for Mac

CC=g++
CFLAGS=-c -Wall
LDFLAGS=-I/opt/local/include/opencv -L/opt/local/lib -lm -lcv -lcxcore -lhighgui -lcvaux

SOURCES_FACE=faceDetector_scrap.cpp faceDetector.cpp
OBJECTS_FACE=$(SOURCES_FACE:.cpp=.o)
EXECUTABLE_FACE=faceDetector_scrap.out

OBJECTS_HAND=$(SOURCES_HAND:.cpp=.o)
EXECUTABLE_HAND=handLocaliser_scrap.out
SOURCES_HAND=faceDetector.cpp handLocaliser.cpp handLocaliser_scrap.cpp


hand: $(EXECUTABLE_HAND)

$(EXECUTABLE_HAND): $(OBJECTS_HAND) 
	$(CC) $(LDFLAGS) $(OBJECTS_HAND) -o $@
	
$(OBJECTS_HAND): %.o: %.cpp
	$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@

face: $(EXECUTABLE_FACE)

$(EXECUTABLE_FACE): $(OBJECTS_FACE) 
	$(CC) $(LDFLAGS) $(OBJECTS_FACE) -o $@
	
$(OBJECTS_FACE): %.o: %.cpp
	$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@


clean:
	rm -f *.o *.out